﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;


namespace Lg.Core
{
    public class JsonHelper:IJsonHelper
    {
        [DbHelper.Grow]
        public string? Test { get; set; }
        public IConfigurationBuilder builder { get; set ; }
        public IConfigurationRoot root { get; set; }
        public JsonHelper(string? filePath=null)
        {
            if (filePath == null)
            {
                builder = new ConfigurationBuilder().AddJsonFile("AppSettings.json", false, true);
            }
            else
            {
                builder = new ConfigurationBuilder().AddJsonFile(filePath, false, true);
            }
            root=builder.Build();
        } 

    }
}
